package com.example.basic.web.model.admire;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@TableName("sys_admire")
@ApiModel(value="admire对象", description="瞻仰厅记录")
public class Admire extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {

    @ApiModelProperty(value = "数据id")
    @TableId(value = "id")
    private String id;

    @ApiModelProperty(value = "瞻仰厅名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "瞻仰厅类型 1普通 2高级")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;
}
